Optimal. Leaf size=124 \[ -\frac {a^3 (3 A+4 B) \sin ^3(c+d x)}{12 d}+\frac {a^3 (3 A+4 B) \sin (c+d x)}{d}+\frac {3 a^3 (3 A+4 B) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {5}{8} a^3 x (3 A+4 B)+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4013, 3791, 2637, 2635, 8, 2633} \[ -\frac {a^3 (3 A+4 B) \sin ^3(c+d x)}{12 d}+\frac {a^3 (3 A+4 B) \sin (c+d x)}{d}+\frac {3 a^3 (3 A+4 B) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {5}{8} a^3 x (3 A+4 B)+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2637
Rule 3791
Rule 4013
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx &=\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {1}{4} (3 A+4 B) \int \cos ^3(c+d x) (a+a \sec (c+d x))^3 \, dx\\ &=\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {1}{4} (3 A+4 B) \int \left (a^3+3 a^3 \cos (c+d x)+3 a^3 \cos ^2(c+d x)+a^3 \cos ^3(c+d x)\right ) \, dx\\ &=\frac {1}{4} a^3 (3 A+4 B) x+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {1}{4} \left (a^3 (3 A+4 B)\right ) \int \cos ^3(c+d x) \, dx+\frac {1}{4} \left (3 a^3 (3 A+4 B)\right ) \int \cos (c+d x) \, dx+\frac {1}{4} \left (3 a^3 (3 A+4 B)\right ) \int \cos ^2(c+d x) \, dx\\ &=\frac {1}{4} a^3 (3 A+4 B) x+\frac {3 a^3 (3 A+4 B) \sin (c+d x)}{4 d}+\frac {3 a^3 (3 A+4 B) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {1}{8} \left (3 a^3 (3 A+4 B)\right ) \int 1 \, dx-\frac {\left (a^3 (3 A+4 B)\right ) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{4 d}\\ &=\frac {5}{8} a^3 (3 A+4 B) x+\frac {a^3 (3 A+4 B) \sin (c+d x)}{d}+\frac {3 a^3 (3 A+4 B) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}-\frac {a^3 (3 A+4 B) \sin ^3(c+d x)}{12 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.27, size = 86, normalized size = 0.69 \[ \frac {a^3 (24 (13 A+15 B) \sin (c+d x)+24 (4 A+3 B) \sin (2 (c+d x))+24 A \sin (3 (c+d x))+3 A \sin (4 (c+d x))+180 A d x+8 B \sin (3 (c+d x))+240 B d x)}{96 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 90, normalized size = 0.73 \[ \frac {15 \, {\left (3 \, A + 4 \, B\right )} a^{3} d x + {\left (6 \, A a^{3} \cos \left (d x + c\right )^{3} + 8 \, {\left (3 \, A + B\right )} a^{3} \cos \left (d x + c\right )^{2} + 9 \, {\left (5 \, A + 4 \, B\right )} a^{3} \cos \left (d x + c\right ) + 8 \, {\left (9 \, A + 11 \, B\right )} a^{3}\right )} \sin \left (d x + c\right )}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 176, normalized size = 1.42 \[ \frac {15 \, {\left (3 \, A a^{3} + 4 \, B a^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (45 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 60 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 165 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 220 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 219 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 292 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 147 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 132 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.32, size = 176, normalized size = 1.42 \[ \frac {A \,a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+A \,a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+\frac {a^{3} B \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+3 A \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+3 a^{3} B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,a^{3} \sin \left (d x +c \right )+3 a^{3} B \sin \left (d x +c \right )+B \left (d x +c \right ) a^{3}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.36, size = 167, normalized size = 1.35 \[ -\frac {96 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{3} - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} - 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} + 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{3} - 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} - 96 \, {\left (d x + c\right )} B a^{3} - 96 \, A a^{3} \sin \left (d x + c\right ) - 288 \, B a^{3} \sin \left (d x + c\right )}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.01, size = 134, normalized size = 1.08 \[ \frac {15\,A\,a^3\,x}{8}+\frac {5\,B\,a^3\,x}{2}+\frac {13\,A\,a^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {15\,B\,a^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {A\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{d}+\frac {A\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {A\,a^3\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {3\,B\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{12\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________